import miao.demo.config.SpringConfig;
import miao.demo.domain.Account;
import miao.demo.service.AccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
/*
    目标：Spring整合Mybatis
        1.添加依赖坐标  mybatis-spring spring-jdbc
        1.确认注解开发，搭建Spring注解开发框架
        2.整合Mybatis 添加数据源配置类 mybatis配置类

 */
public class App2 {
    public static void main(String[] args) {
        ApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig.class);
        AccountService accountService = ctx.getBean(AccountService.class);
        Account account = accountService.findById(2);
        System.out.println(account);

    }
}
